<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="开启nginx端口的输入输出功能（适用于部分资源）">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="ZH-CN_TOPIC_0000002164790296">
<meta name="DC.Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>开启nginx端口的输入输出功能（适用于部分资源）</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="ZH-CN_TOPIC_0000002164790296"></a><a name="ZH-CN_TOPIC_0000002164790296"></a>

<h1 class="topictitle1"><span id="ph7660143752218">开启nginx端口的输入输出功能（适用于部分资源）</span></h1>
<div><p>当待保护资源为以下资源，且待安装客户端的主机开启了防火墙功能，请参考本节打开nginx侦听端口的输入输出功能，nginx侦听端口是<span>OceanProtect</span>与客户端所在主机的通信端口。本节以Red Hat Enterprise Linux Server release 7.2版本为例进行说明。如果未开启防火墙或者待保护资源不是以下资源，请跳过本节。</p>
<p>FusionCompute、Oracle、HDFS、HBase、Hive、Elasticsearch、ClickHouse、Redis、PostgreSQL、MySQL/MariaDB/GreatSQL、GaussDB T、GaussDB(DWS)、华为云Stack GaussDB、openGauss/磐维CMDB、AntDB、Dameng、对象存储、NAS文件、SAP HANA、Kingbase、MongoDB、TDSQL、GBase 8a、TiDB、Informix/GBase 8s、SQL Server、NDMP NAS文件、GaussDB、GoldenDB、OceanBase、华为云Stack、Kubernetes FlexVolume、OpenStack、DB2、FusionOne Compute或文件集。</p>
<div class="section"><h4 class="sectiontitle">操作步骤</h4><ol><li id="ZH-CN_TOPIC_0000002164790296__li183515510494"><span>使用PuTTY工具以<strong id="ZH-CN_TOPIC_0000002164790296__zh-cn_topic_0000002200031305_b916917212">root</strong>账户登录待安装客户端的主机。</span></li><li><span>执行以下命令，查看是否已开启防火墙。</span><p><pre class="screen">systemctl status firewalld</pre>
<p>当回显显示“Active: active (running)”时，表示已开启防火墙，继续执行后续步骤。否则结束处理。</p>
</p></li><li><span>执行以下命令，查看nginx侦听端口。</span><p><pre class="screen">netstat -anp | grep nginx</pre>
<div class="p">示例如下，<span class="parmvalue">“59521”</span>为nginx的侦听端口。<pre class="screen">[root@localhost <font style="font-size:8pt" Face="Courier New" >~</font>]# netstat -anp | grep nginx
tcp        0      0 192.168.97.167:59521       0.0.0.0:*               LISTEN      2483/nginx: master
unix  3      [ ]         STREAM     CONNECTED     20149    2483/nginx: master
unix  3      [ ]         STREAM     CONNECTED     20148    2483/nginx: master</pre>
</div>
</p></li><li><span>执行以下命令，查询已开启输入输出功能的端口列表中是否包含nginx侦听端口。</span><p><pre class="screen">firewall-cmd --permanent --zone=public --list-ports</pre>
<p>回显中包含nginx侦听端口，则处理结束。否则继续执行后续步骤。</p>
</p></li><li><span>执行以下命令，开启nginx侦听端口的输入输出功能。</span><p><p>以端口号<span class="parmvalue">“59521”</span>为例说明。</p>
<pre class="screen">firewall-cmd --zone=public --add-port=<em>59521</em>/tcp --permanent</pre>
</p></li><li><span>执行以下命令，重启防火墙。</span><p><pre class="screen">firewall-cmd --reload</pre>
</p></li></ol>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">版权所有 &copy; 华为技术有限公司</div></body>
</html>